# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-ratelimit
_pkgname=${pkgname#python-}
pkgver=2.2.1
pkgrel=3
pkgdesc='API rate limit decorator.'
arch=('any')
url='https://github.com/tomasbasham/ratelimit'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('cc82c0dd19250889effd328632da4a72c64163858a396a8491b60252313192acbb97fb47224dd8bc2208cac5671ba2620f1fb66f4decdb0211a81278b445b940')

build(){
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package(){
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

